using System;
using System.Collections.Generic;
using System.Linq;
using Hematology.Data.Interface;

namespace Hematology.Data
{
	public partial class Country : IComparable<Country>, IGeoItem
	{
		public static List<Country> GetAllCountries(bool? isOnlyVisible)
		{
			List<Country> countryList = Search(null, null, isOnlyVisible);
			countryList.Sort();
			return countryList;
		}

		public static Country SearchByName(string name)
		{
			return Search(null, name, null).FirstOrDefault();
		}

		public int CompareTo(Country other)
		{
			return Name.CompareTo(other.Name);
		}
	}
}

